package com.igoal.entity;

// Generated Dec 16, 2010 11:41:39 AM by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.compass.annotations.SearchableProperty;

/**
 * BannerClient generated by hbm2java
 */
@Entity
@Table(name = "banner_client")
public class BannerClient extends BaseObject implements Audit {
	private static final long serialVersionUID = 4954838319183217376L;
	
	private Long id;
	private String name;
	private String contact;
	private String email;
	private String extrainfo;
	private boolean checkedOut;
	private Date checkedOutTime;
	private String editor;
	private Date cdate;
	private Date mdate;
	private DataStatus status;
	
	private Set<Banner> banners;	

	public BannerClient() {
	}

	public BannerClient(String name, String contact, String email,
			String extrainfo, boolean checkedOut) {
		this.name = name;
		this.contact = contact;
		this.email = email;
		this.extrainfo = extrainfo;
		this.checkedOut = checkedOut;
	}

	public BannerClient(String name, String contact, String email,
			String extrainfo, boolean checkedOut, Date checkedOutTime,
			String editor) {
		this.name = name;
		this.contact = contact;
		this.email = email;
		this.extrainfo = extrainfo;
		this.checkedOut = checkedOut;
		this.checkedOutTime = checkedOutTime;
		this.editor = editor;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "contact", nullable = false)
	public String getContact() {
		return this.contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	@Column(name = "email", nullable = false)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "extrainfo", nullable = false, length = 65535)
	public String getExtrainfo() {
		return this.extrainfo;
	}

	public void setExtrainfo(String extrainfo) {
		this.extrainfo = extrainfo;
	}

	@Column(name = "checked_out", nullable = false)
	public boolean isCheckedOut() {
		return this.checkedOut;
	}

	public void setCheckedOut(boolean checkedOut) {
		this.checkedOut = checkedOut;
	}

	@Temporal(TemporalType.TIME)
	@Column(name = "checked_out_time", length = 8)
	public Date getCheckedOutTime() {
		return this.checkedOutTime;
	}

	public void setCheckedOutTime(Date checkedOutTime) {
		this.checkedOutTime = checkedOutTime;
	}

	@Column(name = "editor", length = 50)
	public String getEditor() {
		return this.editor;
	}

	public void setEditor(String editor) {
		this.editor = editor;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "cdate", nullable = false, length = 19)
	public Date getCreateDate() {
		return this.cdate;
	}

	public void setCreateDate(Date cdate) {
		this.cdate = cdate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "mdate", nullable = false, length = 19)
	public Date getUpdateDate() {
		return this.mdate;
	}

	public void setUpdateDate(Date mdate) {
		this.mdate = mdate;
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Enumerated(EnumType.STRING)
	@Column(nullable=false, name="status")
	@SearchableProperty
	public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus dataStatus) {
		this.status = dataStatus;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "bannerClient")
	public Set<Banner> getBanners() {
		return this.banners;
	}

	public void setBanners(Set<Banner> banners) {
		this.banners = banners;
	}

}
